import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// global css
import '@/assets/style/index.css'
//全局过滤器
import '@/utils/filter'
import '@/permission'
import {resetForm} from "@/utils";


// element-ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//使用字体图标
import '@/utils/fortawsome.js'
//图片预览插件
import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
//瀑布流插件
import waterfall from 'vue-waterfall2'
//滚动条
import '@/utils/vuescroll'


//使用插件
Vue.use(ElementUI)
//配置项
Viewer.setDefaults({
    zIndexInline: 9999,
})
Vue.use(Viewer)
Vue.use(waterfall)

// 全局方法挂载
Vue.prototype.resetForm = resetForm


Vue.prototype.msgSuccess = function (msg) {
    this.$message({showClose: true, message: msg, type: "success"});
}

Vue.prototype.msgError = function (msg) {
    this.$message({showClose: true, message: msg, type: "error"});
}

Vue.prototype.msgInfo = function (msg) {
    this.$message.info(msg);
}

Vue.prototype.msgWarn = function (msg) {
    this.$message.warning(msg);
}

Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
